﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVVMLightDemo.Models
{
    public class TreeModel:ObservableObject
    {
        private string nodeID;

        public string NodeID
        {
            get { return nodeID; }
            set
            {
                nodeID = value;
                this.RaisePropertyChanged("NodeID");
            }
        }

        private string nodeName;

        public string NodeName
        {
            get { return nodeName; }
            set
            {
                nodeName = value;
                this.RaisePropertyChanged("NodeName");
            }
        }

        private List<TreeModel> childInfo;

        public List<TreeModel> ChildInfo
        {
            get { return childInfo; }
            set
            {
                childInfo = value;
                this.RaisePropertyChanged("ChildNode");
            }
        }

        public TreeModel()
        {
            this.childInfo = new List<TreeModel>();
        }

        public TreeModel(string nodeID,string nodeName)
        {
            this.NodeID = nodeID;
            this.NodeName = nodeName;
            this.childInfo = new List<TreeModel>();
        }
    }
}
